/*  J
**  Date 2007-06-05 21:45:18 
**  File code.h  v 1.0
**  Author Mucker
**  See Copyright Notice in J.h
**  
*/
#ifndef code_h
#define code_h

#include "J.h"
#include "object.h"
#include "chuck.h"
#include "parser.h"

typedef enum duality_operation{
    OPR_ADD, OPR_SUB, OPR_MUL, OPR_DIV, OPR_MOD, OPR_POW, // + - * / % ^ 
    OPR_NONE
}DualOp;

J_API(int) code_addstring(parser_state *ps, Jstring *str);
J_API(Jstring * ) code_getstring(parser_state *ps , unsigned int index);
J_API(void ) code_setvar(parser_state *ps, expdesc *var, expdesc *val);
J_API(int ) code_addnumber(parser_state *ps, Jnumber n);
J_API(int)code_pushchuck(parser_state *ps, parser_state *newps);
J_API(void) code_call(parser_state *ps, expdesc *var);
J_API(void) code_return(parser_state *ps);
J_API(int ) code_method(parser_state *ps, int bx);
J_API(void) code_newobject(parser_state *ps, expdesc *var);
#endif
